<template>
  <div class="home">
    <!-- 路由出口 -->
    <keep-alive include="find,shareList">
      <router-view></router-view>
    </keep-alive>
    <!-- placeholder 生成一个等高元素进行站位 -->
    <van-tabbar
      v-model="active"
      active-color="#e40137"
      inactive-color="#b4b4bd"
      route
      class="jianju"
      placeholder
      v-if="$route.meta.needTab"
    >
      <van-tabbar-item class="dx" to="/home/company">
        <template #default>
          <div>
            公司
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe63d;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item class="dx" to="/home/question">
        <template #default>
          <div>
            刷题
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe63f;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item class="dx" to="/home/find">
        <template #default>
          <div>
            发现
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe646;</i>
        </template>
      </van-tabbar-item>
      <van-tabbar-item class="dx" to="/home/my">
        <template #default>
          <div>
            我的
          </div>
        </template>
        <template #icon>
          <i class="iconfont">&#xe645;</i>
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: ''
    }
  }
}
</script>

<style lang="less" scoped>
.home {
  .jianju {
    padding-bottom: 20px;
  }
  .iconfont {
    font-size: 30px;
  }
  .dx {
    font-size: 14px;
  }
}
</style>
